import Vue from 'vue'
import Router from 'vue-router'
import Home from './view/home.vue'
import Index from './view/index.vue'
Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'home',
      component: Home,
      children: [
        {
          path: '/index',
          name: 'index',
          component: Index
        }
      ]
    }
  ]
})

export default router
